﻿<%@ Page Title="materiallinkinfo" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="lcs.Web.materiallinkinfo.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" src="/js/CheckBox.js" type="text/javascript"></script>
        <link href="../../jquery-ui.min.css" rel="stylesheet" />   
    <script src="../../js/jquery-ui.min.js"></script>
     <script type="text/javascript">
         $(function () {
             $("#<%# txtmlname.ClientID%>").autocomplete({
                 minLength: 2, // 设置搜索的关键字最小长度// 设置自动完成列表的函数，函数包括两个参数，requset和response      
                 source: function (request, response) {
                     $.ajax({
                         type: "POST",          // 通过request.term可以获得文本框内容   
                         url: "../../HandlerM.ashx?keyword=" + request.term,
                         contentType: "application/json; charset=gb2312",
                         dataType: "json",
                         success: function (data) {
                             // jQuery.map(array, callback) :将一个数组中的元素转换到另一个数组中。
                             //  下面就是把数组["value1", "value2",...]转换为[{value:"value1"}, {value:"value2"},...]                 
                             response($.map(data, function (item) {
                                 return { label: item.mms, value: item.mms };
                             }));
                         },
                         error: function () {
                             alert("ajax请求失败");
                         }
                     });
                 }
             });
         });
         </script>
    <style>

        .TreeView  
{ 
    border-bottom:1px dotted #B2B2B2 !important; 
} 
.TreeView div 
{ 
    margin-left:5px; 
} 
.TreeView table 
{ 
    border-top:1px dotted #B2B2B2 !important; 
} 
.TreeView div table 
{ 
    border-bottom:none !important; 
    border-top:none !important; 
} 
.TreeView table td 
{ 
    padding:2px 0; 
} 
.LeafNodesStyle  
{ 
     
} 
 
.RootNodeStyle  
{ 
     
} 
/* ALL ELEMENTS */ 
.NodeStyle  
{ 
} 
.ParentNodeStyle  
{ 
    background:gray; 
} 
a.SelectedNodeStyle  
{ 
    background:#E5E5E5; 
    display:block; 
    padding:2px 0 2px 3px; 
} 
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <!--Title -->

    <!--Title end -->

    <!--Add  -->

    <!--Add end -->

    <!--Search -->
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td style="width: 80px" align="right" class="tdbg">
                <b>物料名：</b>
            </td>
            <td class="tdbg">
                <asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click"></asp:Button>

            </td>
            <td class="tdbg"></td>
        </tr>
    </table>
    <!--Search end-->
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td style="width: 80px" >
                <asp:TreeView ID="treeMenu" runat="server" ShowLines="True" ExpandDepth="2"  >
                </asp:TreeView>
            </td>
            <td class="tdbg">
                <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                    <tr>
                        <td class="tdbg">

                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                <tr>
                                    <td height="25" width="30%" align="right">物料名
	：</td>
                                    <td height="25" width="*" align="left">
                                        <asp:TextBox ID="txtmlname" runat="server" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25" width="30%" align="right">数量
	：</td>
                                    <td height="25" width="*" align="left">
                                        <asp:TextBox ID="txtmlnum" runat="server" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>

                            </table>

                        </td>
                    </tr>
                    <tr>
                        <td class="tdbg" align="center" valign="bottom">
                            <asp:Button ID="btnSave" runat="server" Text="增加"
                                OnClick="btnSave_Click" class="inputbutton"></asp:Button>
                             <asp:Button ID="btnxg" runat="server" Text="修改"
                                OnClick="btnSavexg_Click" class="inputbutton"></asp:Button>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;">
        <tr>
            <td style="width: 1px;"></td>
            <td align="left">
                <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" />
            </td>
        </tr>
    </table>

</asp:Content>
<%--<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceCheckright" runat="server">
</asp:Content>--%>
